/* this function does cookie-auth

Inputs:
- end user ip (optional)
- expiration time (optional)
- ACL
- key (salt)

MAC = hex(md5(ipvalue, expirestime, accesspath, salt))
MAC = hex(md5(ipvalueexpirestimeaccesspathsalt))

*/

function cookieauth()
{
    var enduserip="";
    var expirationtime="";
    var acl="";
    var key="";
    var combinedstring="";
    var combinedmd5 = "";
    var hmac = "";

    // generate the combined string

    combinedstring=enduserip+expirationtime+acl+key;
    combinedstring="192.22.22.55971899742/sample.gif!/boo.exemyseed";
    
    // now we have the combined string
    return combinedstring;

} // end function


